﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.DomainObjects;

namespace AutomotivePricingModel.Countries
{
    public partial class Country : KeyedDomainObjectBase<Guid, Country>
    {
        private string m_Name;

        public Country()
        {
            m_Key = Guid.NewGuid();
            m_Name = string.Empty;
        }

        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        #region DomainObject Methods

        public override Country Copy()
        {
            Country copy = new Country();
            CopyTo(copy);
            return copy;
        }

        public override void CopyTo(Country otherObject)
        {
            if (otherObject.m_Key != m_Key)
            { otherObject.m_Key = m_Key; }
            if (otherObject.m_Name != m_Name)
            { otherObject.m_Name = m_Name; }
        }

        public override bool Equals(Country otherObject)
        {
            if (otherObject.m_Key != m_Key)
            { return false; }
            if (otherObject.m_Name != m_Name)
            { return false; }
            return true;
        }

        #endregion
    }
}